<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="gdufs.stat.service.Utils"%>
<%@page import="gdufs.stat.service.vo.Bill"%>
<%@page import="gdufs.stat.service.BillQuery"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<html>
<head>
<title>一卡通查询</title>
<%@include file="/inc/head.jsp" %>
<style type="text/css">
#label{
	font-weight: bold;
}
</style>
<link >
</head>
<body>
<%
ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(application); 
BillQuery billQuery = (BillQuery)context.getBean("billQuery");
Bill bill = billQuery.queryBill(Utils.getCurrentUserId(request));
%>
<table width="100%" cellpadding="8" cellspacing="0" border="0">
	<tr>
		<td id="label">卡状态:</td>
		<td><%=bill.getStatus() %></td>
		<td id="label">卡余额:</td>
		<td><%=bill.getRemainder() %>元</td>
	</tr>
	<tr>
		<td id="label">昨日消费:</td>
		<td><%=bill.getYesterdayAmount() %>元</td>
		<td id="label">一周消费:</td>
		<td><%=bill.getLastWeekAmount() %>元</td>
	</tr>
	<tr>
		<td colspan="3">
			<span id="label">统计结束时间:</span>
			<span><%=DateFormatUtils.format(bill.getEndTime(),"yyyy-MM-dd") %></span>
		</td>
		<td align="right">
			<a href="http://ykt.gdufs.edu.cn/gdufsPortalHome.action" target="_blank">查看更多</a>
		</td>
		
	</tr>
</table>

</body>
</html>